package com.hzw.dao;

import com.hzw.bean.Article;
import com.hzw.dto.ArticleCondition;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface ArticleMapper extends Mapper<Article> {
    int deleteArticleById(String articleId);

    Article selectArticleById(String articleId);

    List<Article> selectArticleByUserIds(String userId);

    List<Article> selectArticleByCondition(ArticleCondition articleCondition);

    List<Article> selectArticleByKeyWord(@Param("keyWord") String keyWord);

    String selectArticleTitleById(String articleId);

    List<Article> selectChargeFull();

    List<Article> selectRecommendArticle();

    List<Article> selectNewestArticle();

    Article selectArticleByCommentId(String commentId);

    List<Article> selectRecommendArticleByCondition(Article article);
}